﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PJ.Framework.Common;
using PJ.Data.Inventory;

namespace PJ.Business.Inventory
{
    /// <summary>
    /// InventoryItemService class
    /// </summary>
    public class InventoryItemService : ItemService<IInventoryItem, IInventoryItemData, IInventoryItemProvider>, IInventoryItemService
    {
        private IInventoryItemSalesParamService m_SalesParamService;


        [Microsoft.Practices.Unity.InjectionConstructor]
        public InventoryItemService(IInventoryItemProvider dataService, InventoryItemSalesParamService salesParamService)
            : base(dataService)
        {
            if (salesParamService == null)
                throw new ArgumentNullException();
            m_SalesParamService = salesParamService;
        }

        public IInventoryItemSalesParamService SalesParamService
        {
            get { return m_SalesParamService; }
        }


        public override IInventoryItem CreateNewItem()
        {
            return new InventoryItem();
        }
    }
}
